<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreatePostsTable extends Migration
{
    public function up()
    {

        Schema::create('posts', function (Blueprint $table) {
            $table->uuid('id');
            $table->integer('user_id')->nullable();
            $table->integer('cate_id')->nullable();
			$table->string('pos')->nullable();
            $table->string('title');
            $table->text('excerpt');
            $table->text('content');
            $table->string('image')->nullable();
            $table->text('meta_description');
            $table->text('meta_keywords');
            $table->tinyInteger('status')->default(1);
            $table->timestamps();
			$table->primary('id');
        });
        
        Schema::create('pages', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('user_id');
            $table->string('title');
            $table->text('excerpt')->nullable();
            $table->text('content')->nullable();
            $table->string('image')->nullable();
            $table->string('slug')->unique();
            $table->text('meta_description')->nullable();
            $table->text('meta_keywords')->nullable();
            $table->tinyInteger('status')->default(1);
            $table->timestamps();
        });

    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('posts');
		Schema::drop('psges');
    }
}
